package com.ctvit.framework.web.context;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import flex.messaging.FlexContext;

public class SessionContext {
	public void setSession(String atr, Object val,HttpServletRequest req) {
		HttpServletRequest request = FlexContext.getHttpRequest();
		if (req==null)
			req=request;
		HttpSession session = req.getSession();
		session.setAttribute(atr, val);
	}

	public Object getSession(String atr) {
		HttpServletRequest request = FlexContext.getHttpRequest();
		HttpSession session = request.getSession();
		return session.getAttribute(atr);
	}

}
